﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting;
using System.Net.Http; 

namespace Progam3
{
    class Program
    {
        static void Main(string[] args)
        {
            // Dang ki chanenel va port
            HttpChannel channel = new HttpChannel(13010);
            //Dang ki channel voi remoting service
            ChannelServices.RegisterChannel(channel);
            //Dang ki kieu la well-Know(sever)
            RemotingConfiguration.RegisterWellKnownServiceType(typeof(Mathlib.SimpleMath),"MyURI.soap",WellKnownObjectMode.Singleton);
            Console.WriteLine("Server start,press enter to end");
            Console.ReadLine();
            Console.Beep();
            ChannelServices.RegisterChannel(channel);

        }
    }
}
